package com.link.wseller.advice;


import com.link.wseller.http.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.simpleframework.xml.Order;
import org.springframework.web.bind.annotation.ExceptionHandler;

@org.springframework.web.bind.annotation.RestControllerAdvice
@org.springframework.core.annotation.Order(1)
@Slf4j
public class RestControllerAdvice {

    @ExceptionHandler(NullPointerException.class)
    public JsonResult handlerNullPointer(Exception pointerException){
        log.error("空空值: {}", pointerException.getMessage());
        return JsonResult.error("服务器出错");
    }


}
